Skip to content

batch_daily example#113

Open
hellais wants to merge 3 commits intotemporalio:mainfrom
hellais:sample-batch
Open

batch_daily example#113
hellais wants to merge 3 commits intotemporalio:mainfrom
hellais:sample-batch

Conversation

@hellais
Copy link
Copy Markdown

@hellais hellais commented Apr 25, 2024

What was changed

Add a batch_daily example that demonstrates how to process records divided into daily batches of records.

Why?

It was helpful to better understand how to implement my use-case in a toy project.

Checklist

  1. Closes: Sample request: Batch #112

  2. How was this tested:

Ran the steps outlined in the README.md for this subtree and confirmed it ran properly.

  1. Any docs updates needed?

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 25, 2024

CLA assistant check
All committers have signed the CLA.

@hellais hellais marked this pull request as draft April 25, 2024 14:02
@hellais hellais marked this pull request as ready for review April 25, 2024 17:03
Comment thread batch_daily/workflows.py

task_list = []
async with asyncio.TaskGroup() as tg:
for key in record_uri_list:
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no good as it runs the risk of spamming the event history log. It should probably work similarly to the java example where it uses continue_as_new to reset the event history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sample request: Batch

2 participants